import Vue from "vue"
import Vuex from "vuex"

Vue.use(Vuex)

const state = {
  dragController: null,
  selectedTreeNode: null
}

const mutations = {
  saveDragController(state, dragController) {
    state.dragController = dragController
  },
  saveSelectedTreeNode(state, node) {
    state.selectedTreeNode = node
  }
}

export default new Vuex.Store({
  state,
  mutations
})